package org.jeecg.common.oa.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum PendingStateEnum {
    /**
     * 状态：0:未办理；1:已办理 将待办更新为已办只需要改此参数即可，其余参数和待办一致
     */

    NOT_PROCESSED (0, "未办理"),
    PROCESSED(1,"已办理");

    int status;
    String name;

    public static String getName(Integer status){
        if (status == null){
            return null;
        }
        for (PendingStateEnum mode : PendingStateEnum.values()){
            if (mode.getStatus() == status.intValue()) {
                return mode.name;
            }
        }
        return null;
    }
}
